<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>【<{$plat['name']}>注册统计】-弹溜溜-国内首家科技金融互动社群</title>
</head>
<link rel="stylesheet" href="/static/default/css/index.css" />
<link rel="stylesheet" href="/static/default/css/common.css" />
<script src="/static/default/js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/public/jquery.datetimepicker.js"></script>
<link rel="stylesheet" type="text/css" href="/static/public/jquery.datetimepicker.css">
<body>
<div class="x-main-upper w1180-con">
    <div class="main-right" style="margin:50px auto;float: none;">
        <div class="mright-content">
            <div class="cash66 mt15">
                <!--title-->
                <div class="title">
                    <div class="vertical"></div>
                    <p class="title66"><{$plat['name']}>--注册统计</p>
                    <div class="fr">
                        <div class="date fl">起始日期</div>
                        <input type="text" id="start_date" class="date_picker" readonly="readonly" placeholder="点击选择日期" value="<{$start_date}>">
                        -
                        <input type="text" id="end_date" class="date_picker" readonly="readonly" placeholder="点击选择日期" value="<{$end_date}>">
                    </div>
                    <!--日期选择-->
                </div>
                <div class="clear"></div>
                
                <div class="cash-code mt15">
                    <table class="taste">
                        <tr>
                            <th>日期</th>
                            <th>注册量</th>
                        </tr>
                        <tbody>
                        <{foreach from=$list item=val}>
                        <tr>
                            <td><{$val['day']}></td>
                            <td><{$val['percent_num']}></td>
                        </tr>
                        <{/foreach}>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="clear"></div>

<script>
    $(function(){
        $('#start_date').datetimepicker({
            format:'Y/m/d',
            closeOnDateSelect: true,
            lang:'zh',
            onChangeDateTime:function(){
                screen_s();
            },
            onShow:function( ct ){
                this.setOptions({
                    maxDate:$('#end_date').val()?$('#end_date').val():false
                })
            },
            timepicker:false
        });
        $('#end_date').datetimepicker({
            format:'Y/m/d',
            closeOnDateSelect: true,
            lang:'zh',
            maxDate:new Date(),
            onChangeDateTime:function(){
                screen_s();
            },
            onShow:function( ct ){
                this.setOptions({
                    minDate:$('#start_date').val()?$('#start_date').val():false
                })
            },
            timepicker:false
        });
    });
    function screen_s() {

        var start_date = $("#start_date").val();
        var end_date = $("#end_date").val();
        location.href = '/statistics.html?plat=<{$plat["value"]}>&time_start='+start_date+'&time_end='+end_date
    }

</script>
</body>
</html>
